import request from "@/utils/request";
// 首页
export const getIndex = (data) => {
	return request.get("/index/index", data);
};
// banner
export const getBanner = () => {
	return request.get("/index/bannerList");
};
// 清空搜索历史
export const clearHistory = (data) => {
	return request.get("/index/clearHistory", data);
};
// 收藏取消收藏
export const collect = (data) => {
	return request.get("/index/collectionGoods", data);
};
// 商品详情
export const getGoodsInfo = (data) => {
	return request.get("/index/goodsInfo", data);
};
// 商品列表
export const getGoodsList = (data) => {
	return request.post("/index/goodsList", data);
};
// 推荐文创
export const getRecommend = (data) => {
	return request.post("/index/recommendGoodsList", data);
};
// 搜索历史
export const getHistory = (data) => {
	return request.get("/index/searchHistory", data);
};
// 搜索
export const search = (data) => {
	return request.post("/index/searchProject", data);
};
// 搜索排名
export const searchRank = (data) => {
	return request.get("/index/searchTop", data);
};

// 研学产品详情
export const enterDetail = (data) => {
	return request.get("/project/enterDetail", data);
};

// 研学详情
export const projectInfo = (data) => {
	return request.post("/project/projectInfo", data);
};

// 研学详情用户调研
export const surveyGoods = (data) => {
	return request.post("/project/surveyGoods", data);
};

// 研学可参与日期列表
export const projectDateList = (data) => {
	return request.get("/project/projectDateList", data);
};

// 研学可参与日期列表
export const projectDateListtwo = (data) => {
	return request.get("/project/projectDateList2", data);
};

// 生成研学邀请函
export const getProjectInviteInfo = (data) => {
	return request.get("/project/getProjectInviteInfo", data);
};

export const getleaveDetail = (data) => {
	return request.post("/project/leaveDetail", data);
};

export default {
	getIndex,
	getBanner,
	clearHistory,
	collect,
	getGoodsInfo,
	getGoodsList,
	getRecommend,
	getHistory,
	search,
	searchRank,
	enterDetail,
	projectInfo,
	surveyGoods,
	projectDateList,
	getProjectInviteInfo,
	getleaveDetail,
	projectDateListtwo
};